<?php
namespace app\api\behavior;
/**
 * 检测用户登陆 权限控制
 */
class ListenRule
{
    static public function run()
    { 
        $request = request();
        $controller = strtolower(request()->controller());
        /*
        if ( $controller  != 'index' )
        {
            halt(session('allowUrls'));
            if( !is_array(session('allowUrls')) || !in_array( $controller , session('allowUrls') ))
            {
                if ($request->isAjax())
                {
                    return js_return(0, '没有权限');
                    exit;
                }
                else
                {
                    header("Location:" . url( '/'. config('admin_name').'/'));
                    exit;
                }                
            }           
        }
        */
    }
}
